home *** CD-ROM | disk | FTP | other *** search
/ Hackers Underworld 2: Forbidden Knowledge / Hackers Underworld 2: Forbidden Knowledge.iso / LEGAL / EFF405.TXT < prev    next >
Text File  |  1994-07-17  |  30KB  |  587 lines

  1.                //////////////  //////////////// //////////////
  2.             ////             ////             ////
  3. _________ /////////________ /////////_______ /////////________________
  4.         ////               ////             ////
  5.       //////////////////  ////             ////
  6.  
  7. //////////////////////////////////////////////////////////////////////
  8. EFFector Online 4.05          1/7/1993                 editors@eff.org
  9. A Publication of the Electronic Frontier Foundation     ISSN 1062-9424
  10.  
  11.                      -==--==--==-<>-==--==--==-
  12. [Editor's Note: With this issue, EFFector Online will begin to
  13. examine the technical, social, moral, legal and political issues 
  14. surrounding the uses of encryption in computer-based communications. 
  15. While many in various online communities around the world are highly 
  16. conversant with cryptography and encryption, many others are not. 
  17. Because of this we begin our series with Larry Loen's superb primer on
  18. basic cryptography. This article originally appeared as a proto-FAQ
  19. in the Usenet group, sci.crypt. Our readers with an interest in
  20. learning about encryption on an ad-hoc basis are advised to read
  21. sci-crypt and to participate in it. As with any other place on
  22. the Net, "Ask. People know.How the world works is not a secret." -GV]
  23.                      -==--==--==-<>-==--==--==-
  24.  
  25.                     HIDING DATA IN PLAIN SIGHT
  26.                Some Key Questions About Cryptography
  27.             BY LARRY LOEN (lwloen@rchland.vnet.ibm.com)
  28.  
  29. NOTE: The information and opinions expressed in this article
  30. are those of the author and his collaborators and do not
  31. represent the final word on these matters or the opinions,
  32. views or policies of any company or organization.
  33.  
  34.  
  35. Q1:  What is cryptography?  How, basically, does it work?
  36.   What are the basic terms used to describe cryptography?
  37.  
  38.   Cryptography is the art and science of hiding data in plain sight.
  39.   It is also the art and science of stealing data hidden in plain sight.
  40.   There are at least three players. The first is the one who has
  41.   the original data, which is presumed to have high value to
  42.   others. This data is presumed to reside in a safe place that
  43.   no one but the originator and his/her friends can see. (If the
  44.   originator cannot physically secure the original data,
  45.   cryptography is a waste of time). Now, for cryptography to be
  46.   necessary, the data must, for some reason, have to be
  47.   transmitted over some public means such as a telephone line, a
  48.   letter through the mail; any means that cannot be physically
  49.   secured by the owner to a legitimate receiver of the data. The
  50.   receiver is the second party.
  51.  
  52.   Cryptography is any transformation of the data into a form
  53.   that cannot (it is hoped) be recovered in a timely manner by an
  54.   unknown party, which is called here 'the opponent'.
  55.   The transformation is not some physical means, such as hiding the
  56.   data on microfilm or  some such; it is some mathematical
  57.   transformation that scrambles the original data in a way
  58.   that the receiver on the other end knows how to unscramble.
  59.  
  60.   The process of scrambling (transforming) the data is called
  61.   'encryption'. Unscrambling is called decryption. An
  62.   encryption system has two basic parts. 1) A general
  63.   transformation process called the encryption algorithm. 2) A
  64.   customization of that algorithm called a cipher key. The
  65.   sender and the receiver must find a secure means to exchange
  66.   the cipher key. That is, the same public means used to send
  67.   the encrypted data cannot be used. This may be a difficult
  68.   problem, and has a variety of solutions, but will be assumed
  69.   solved for now. Once the key is successfully exchanged, the
  70.   two parties can separately implement the encryption algorithm
  71.   and its inverse, the decryption algorithm.
  72.  
  73.   At this point, the data can be transmitted in its encrypted form
  74.   using the agreed-to key to customize the general algorithm to a
  75.   particular version that transforms the data. Since the
  76.   encrypted data is sent over some insecure medium, it is assumed
  77.   that an opponent (the third party) may intercept the data,
  78.   possibly without being detected, and analyze the encrypted
  79.   text, also called cipher text.
  80.  
  81.   In theory, any encryption system can be defeated, given enough
  82.   time. The amount of time it takes cannot always be predicted.
  83.   This is because the opponent can supply extra information
  84.   that might reduce the computation time a great deal. For one
  85.   thing, the sender and receiver may make a very poor choice of
  86.   cipher key. If the opponent has a list of poor keys, a
  87.   computer may permit a large list of such keys to be tried;
  88.   if the poor key actually used is on the list, the opponent wins
  89.   even if the encryption system is otherwise secure.
  90.  
  91.   All methods the opponent dreams up have one thing in common.
  92.   It is an attempt to recover the original data without advance
  93.   knowledge of the particular cipher key. There are a wide
  94.   variety of means available and some will be described later on.
  95.   The name for any of these methods is called 'cryptanalysis' and
  96.   the person who does the penetration is called the cryptanalyst.
  97.  
  98.   In diagram form (the boxes indicated physically secure areas)--
  99.  
  100.   -------------|                   --------------
  101.     Sender     |                   | Receiver
  102.    "x"         |                   |  cipher key
  103.     cipher key |------->  y  ----->|
  104.    y=Encrypt(  |          |        | x=Decrypt(y,key)
  105.       x,key)   |          |        |
  106.   -------------|          |        |-------------
  107.                           V
  108.                      Opponent
  109.                      z = Cryptanalysis(y,Encrypt Algorithm,
  110.                          general knowledge of x, guesses about
  111.                          secret key, statistical analysis of y)
  112.  
  113.        The opponent uses Cryptanalysis of message y until
  114.        the value z is either equal to x or z is "enough" like
  115.        x to accomplish the illicit purpose. The sender and
  116.        receiver win whenever recovery of z takes too much time.
  117.  
  118. Q2:  I have invented this wonderful, fast-running encryption
  119.   algorithm. How do I find out if it is as great as I think it
  120.   is?
  121.  
  122.   It is one thousand times easier to invent an encryption
  123.   algorithm than it is to discover if it is worthwhile. Most
  124.   designers who have not learned cryptography are used to dealing
  125.   with mathematics that discusses the general case. But,
  126.   successful cryptanalysis often relies on any number of
  127.   fortuitous special cases that the designer must anticipate lest
  128.   a given key and data stream create even one of them. Many
  129.   practical illicit decryptions astonish the newcomer; they seem
  130.   like cheating, but they do work.
  131.  
  132.   It is easy to get superficial reassurance that a poor
  133.   encryption algorithm seems good. Most people reading this file
  134.   have probably attempted the kinds of cryptograms one finds in
  135.   newspapers and puzzle books (usually called 'cryptograms').
  136.   That encryption algorithm is simple -- one replaces each letter
  137.   of the alphabet with exactly one other letter of the alphabet.
  138.   In less than an hour, sixth graders have been taught to
  139.   successfully solve this kind of cipher. Yet, it has 26
  140.   factorial possible keys (about 2 to the 88th power), which is
  141.   much more than the 2 to the 56th keys of the well known
  142.   commercial algorithm, DES. A large number of keys is
  143.   important, but is not by itself secure. Obviously, the
  144.   successful sixth graders do not attempt all possible keys.
  145.   They use their general knowledge of English to shortcut the
  146.   process and eliminate all but a few possible keys.
  147.  
  148.   Since the gross mathematical properties of an encryption
  149.   system prove nothing, only cryptanalytic attacks matter
  150.   and these require some study.
  151.  
  152. Q3:  What is an "attack"?
  153.  
  154.   An attack is a particular form of cryptanalysis. There are
  155.   generic types of attacks, and some very specific attacks. In
  156.   the end, cryptography is a war of specifics. The opponent
  157.   will either invent a very clever and unique attack or will
  158.   customize a general attack to suit the need